package com.zhj.edu.result;

/**
 * 消息枚举
 */
public enum ResponseCode {

    SUCCESS(0,"请求成功"),
    LOGIN_EXCEPTION(100,"登录失败"),
    AUTHENTICATION_EXCEPTION(401,"身份校验失败"),
    NO_PERMISSION_EXCEPTION(403,"没有权限访问这个方法"),
    SQL_EXCEPTION(101,"SQL异常"),
    SYSTEM_EXCEPTION(102,"系统异常"),
    SMS_SEND_EXCEPTION(103,"短信发送异常"),
    SLOT_INVOKE_EXCEPTION(104,"执行异常"),
    PARAMETER_EXCEPTION(105,"传输参数有误，不能执行"),
    TENANT_ID_EXCEPTION(106,"租户ID有误，不能更新数据"),
    PRODUCT_ID_EXCEPTION(107,"产品ID有误，不能查询数据"),
    ORDER_NUMBER_EXCEPTION(108,"订单号有误，不能修改"),
    LIMIT_MINUTE_EXCEPTION(109, "超过了1分钟限流"),
    LIMIT_HOUR_EXCEPTION(110, "超过了1小时限流"),
    LIMIT_DAY_EXCEPTION(111, "超过了1天限流"),
    SIGN_EXCEPTION(112, "签名未传递"),
    REQ_EXCEPTION(113, "请求异常...身份不对"),
    BLACK_EXCEPTION(114, "黑名单异常"),
    PRODUCT_NOT_FOUND_EXCEPTION(115, "产品不存在"),
    DEVICE_NOT_FOUND_EXCEPTION(116, "设备不存在"),
    DEVICE_KEY_EXCEPTION(117, "设备key有误"),
    SEND_MESSAGE_MQ_EXCEPTION(118, "发送消息到队列中失败"),
    QUEUE_NAME_EXCEPTION(119, "队列名字为空不能发送消息到队列"),
    FAIL(-1,"请求失败");

    private Integer code;

    private String msg;

    ResponseCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
